package cn.Test01;

import cn.Test01.entity.Province;
import cn.Test01.service.impl.LiaoService;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class test01 {
    @Test
    public void test01() {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring.xml");
        LiaoService ilaioService = (LiaoService) applicationContext.getBean("liaoService");
        List<Province> allProvinces = ilaioService.findAllProvinces();
        for (Province allProvince : allProvinces) {
            System.out.println(allProvince.getPname());
        }
    }
}
